import request from './request';

/**
 *
 * @param {*} text 搜索建议
 * @returns
 */
export const getSearchList = (text) => {
  return request({
    url: `/search/suggest?keywords=${text}`
  })
}

/**
 * @description 搜索结果
 * @param {*} props
 * @returns
 */
export const getSearchResult = (props) => {
  const { keywords, limit = 100, offset = 0, type = 1 } = props;
  return request({
    url: `/search?keywords=${keywords}&limit=${limit}&offset=${offset}&type=${type}`
  })
}
